package com.mydemo.thread;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: JoinThread, v1.0 2019-09-17 11:06 liming1 Exp $
 */
public class JoinThread implements Runnable {
    private String threadName;

    public JoinThread(String name){
        this.threadName = name;
    }

    @Override
    public void run() {
        System.out.println("执行线程名" + threadName);
        try {
            Thread.sleep( 500L);
            Thread.yield();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("执行线程结束" + threadName);
    }
}
